package com.yh.service;

import com.yh.po.Blog;
import com.yh.vo.BlogQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface BlogService {

    Blog getBlog(Long id);

    Blog getAndConvert(Long id);

    Page<Blog> listBlog(Pageable pageable, BlogQuery blog);

    Page<Blog> listBlog(Pageable pageable);

    Page<Blog> listBlog(String query, Pageable pageable);

    Page<Blog> listBlog(Long id, Pageable pageable);

    List<Blog> listRecommendBlogTop(Integer size);

    List<Blog> listUpdateTimeBlog();

//    Map<String , List<Blog>> archivesBlog();
//
//    Long countBlog();

    Blog saveBlog(Blog blog);

    Blog updateBlog(Long id,Blog blog);

    void deleteBlog(Long id);

    long CountBlog();

    long CountViews();
}
